package com.liao.rent.config;


import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * @Author: ljt
 * @Description: knif4接口文档地址 http://127.0.0.1:8080/doc.html  swwager http://localhost:8080/swagger-ui/index.html
 * @DateTime: 2024/11/24 下午9:29
 **/
@Configuration
public class SwaggerConfig {

    // 设置 openapi 基础参数
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("租房api管理")
                        .contact(new Contact().name("liao").email("2858015963").url("https://blog.csdn.net"))
                        .version("1.0")
                        .description( "SpringBoot 集成 Knife4j 示例")
                        .license(new License().name("Apache 2.0")));
    }
}
